<extend name="Base/common"/>
<block name="style">
    <style type="text/css">
       .login-logo{
          width:100px;
          height:100px; 
       }
    .tips{
        position:fixed;
        top:0px;
        background: rgba(41,81,196,0.5);
        width:100%;
        color:#fff;
        font-size:16px;
        text-align: left;
        text-indent: 2em;
        line-height:30px;
        z-index: 99;
    }
       
        
        /*.weui-cell_access .weui-cell__ftnone:after{border-style:none;}*/
    </style>
</block>
<block name="body">
  <p class="tips"></p>
    <div class="content">
      <!-- <div>-----------------------------------------</div> -->
        <form class="formtijiao" action="" method="post">
          <php>
            $a=ACTION_NAME;
            if($a=='unband_wx'){
              C('WEB_SITE_TITLE','解绑微信');
              $v='解绑当前微信';
            }else{
              C('WEB_SITE_TITLE','绑定微信');
              $v='绑定当前微信';
            }
          </php>
              <input type="button"   value="{$v}" class="login-btn"  style="margin-top:20%;width:70%;margin-left:15%"/>     
        </form>
    </div>

</block>
<block name="script">
    
    <script>

        Zepto(function($){


             $('.login-btn').click(function(){
                $.ajax({
                    type:'post',
                    url:'',
                    data:{'s':1},
                    success:function(m){
                        if(m==0){
                          $('.tips').html('操作失败')
                          $('.tips').show()
                          setTimeout(function(){
                              $('.tips').hide()                              
                          },3000)
                        }else if(m>0){
                            $('.tips').html('操作成功')
                            $('.tips').show()
                            setTimeout(function(){
                                $('.tips').hide()
                                location.href="{:U('index')}"
                            },1500)
                        }else{
                          $('.tips').html(m)
                          $('.tips').show()
                          setTimeout(function(){
                              $('.tips').hide()                              
                          },3000)
                        }
                    }
                });

            });


        
  }) ;

    </script>

</block>